#!/usr/bin/env python
# encoding: utf-8

import MySQLdb
import json

def search(sql, host='localhost', user='root', port=3306):
	conn = MySQLdb.connect(host=host, user=user, port=port)
	cur = conn.cursor()
	cur.execute(sql)
	for data in cur.fetchall():
		print data
	conn.close()


#search('show databases; use db_monitor_plugin_agent; show tables;')
#sql = "select * from plugin_tasks where name='pony_agent_6'\G" 
